#include "layout.h"

//=====================================================================
//                Layout type to manipulate geometry 
//=====================================================================

static PyMemberDef Layout_members [] = 
{
  {NULL}  // Sentinel 
};

static PyMethodDef Layout_methods [] =
{
  {NULL}  // Sentinel 
};

static PyTypeObject LayoutType = 
{
  PyObject_HEAD_INIT(NULL)
  0,                         // ob_size 
  "ph.Layout",               // tp_name
  sizeof(Layout),            // tp_basicsize 
  0,                         // tp_itemsize
  (destructor)Layout_dealloc,// tp_dealloc
  0,                         // tp_print 
  0,                         // tp_getattr 
  0,                         // tp_setattr
  0,                         // tp_compare 
  0,                         // tp_repr
  0,                         // tp_as_number
  0,                         // tp_as_sequence 
  0,                         // tp_as_mapping 
  0,                         // tp_hash 
  0,                         // tp_call
  0,                         // tp_str
  0,                         // tp_getattro
  0,                         // tp_setattro
  0,                         // tp_as_buffer
  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, // tp_flags 
  "Photon wrapper classes",  // tp_doc 
  0,                         // tp_traverse 
  0,                         // tp_clear 
  0,                         // tp_richcompare 
  0,                         // tp_weaklistoffset 
  0,                         // tp_iter 
  0,                         // tp_iternext 
  Layout_methods,            // tp_methods 
  Layout_members,            // tp_members
  0,                         // tp_getset 
  0,                         // tp_base 
  0,                         // tp_dict
  0,                         // tp_descr_get 
  0,                         // tp_descr_set 
  0,                         // tp_dictoffset 
  (initproc)Layout_init,     // tp_init
  0,                         // tp_alloc 
  Layout_new,                // tp_new 
};

static void Layout_dealloc (Layout* self)
{
  self->ob_type->tp_free ((PyObject*) self);
}

static PyObject* Layout_new (PyTypeObject* type, PyObject* args)
{
  Layout* self;

  self = (Layout*) type->tp_alloc (type, 0);
  self->internal_type = eLayoutNone;

  return (PyObject*) self; 
}

static int Layout_init (Layout* self, PyObject* args)
{
  const char* repr;
  PyObject* dict;
  
  if (PyArg_ParseTuple (args, "sO", &repr, &dict))
  {
  }
  else
  {
    PyErr_SetString (PyExc_TypeError, "Must be string and then dictionary");
    return -1;
  }
}

//=====================================================================
//                Module declaration functions
//=====================================================================

static PyMethodDef module_methods [] = 
{
  {NULL, NULL, 0, NULL}
};

INIT_FUNC (ph_api_layout, Layout)
